package com.example.dailyrecord.entity;

import com.example.dailyrecord.util.IDUtils;
import lombok.Data;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@Data
@ApiModel("科目")
public class Subject {
    @ApiModelProperty("")
    private String id;
    @ApiModelProperty("科目")
    private String km;
    @ApiModelProperty("用户id")
    private String uid;
    public static final String TABLE_NAME = "subject";
    public static final String[] ALL_COLUMNS = { "`id`", "`km`", "`uid`"};
    public static final String ID_COLUMN = "`id`";
    public static final String ID_NAME = "id";
    public static final String KM_COLUMN = "`km`";
    public static final String KM_NAME = "km";
    public static final String UID_COLUMN = "`uid`";
    public static final String UID_NAME = "uid";

    public static Subject getInstance(String km, String uid) {
        Subject subject = new Subject();
        subject.setId(IDUtils.getStringID());
        subject.setUid(uid);
        subject.setKm(km);
        return subject;
    }
}
